package com.myutil.draw;

import java.awt.Color;

import com.myutil.graph.CorNode;

public class Nodedrawable extends Drawable{
	
	public CorNode node;
	
	public Nodedrawable(Color color, CorNode node) {
		this.color = color;
		this.node = node;
	}
	public Nodedrawable(CorNode node) {
		this.color = Color.blue;
		this.node = node;
	}
	
	
	public static Nodedrawable[] convertTo(CorNode[] nodes, Color color) {
		Nodedrawable[] draws=new Nodedrawable[nodes.length];
		for(int i=0;i<nodes.length;i++){
			draws[i]=new Nodedrawable(color, nodes[i]);
		}
		return draws;
	}
	public static Nodedrawable[] convertTo(CorNode[] nodes) {
		Nodedrawable[] draws=new Nodedrawable[nodes.length];
		for(int i=0;i<nodes.length;i++){
			draws[i]=new Nodedrawable(nodes[i]);
		}
		return draws;
	}

}
